# Maintainer: JackNapier <jacknapier151@gmail.com>
# Contributor: 

##########
# Godot4 #
##########
pkgname=(
	"godot4-rc-src"
	##################
	# Godot GDScript #
	##################
	"godot4-rc-bin"
	"godot4-rc-bin32"
	"godot4-rc-export-templates-bin"
	"libgodot4-rc-bin"
	"godot4-rc-web-bin"
	"godot4-rc-osx-bin"
	"godot4-rc-win32-bin"
	"godot4-rc-win64-bin"
	"godot4-rc-android-apk-bin"
	"godot4-rc-android-aab-bin"
	##############
	# Godot Mono #
	##############
	"godot4-rc-mono-bin"
	"godot4-rc-mono-bin32"
	"godot4-rc-mono-export-templates-bin"
	"godot4-rc-mono-osx-bin"
	"godot4-rc-mono-win32-bin"
	"godot4-rc-mono-win64-bin"
	)
_pkgver="4.2"
_pkgverb=2
pkgver="${_pkgver}rc${_pkgverb}"
pkgrel=1
pkgdesc="Godot4 Game Engine: An advanced, feature packed, multi-platform 2D and 3D game engine."
url="http://www.godotengine.org"
license=("MIT")
groups=(
	"godot-full"
	"godot4"
	"godot42"
	"godot-bin"
	"godot-rc"
)
arch=("any")
_monodepends=(
	"mono>=6.12.0"
	"dotnet-sdk"
	"msbuild"
)
depends=(
	"godot-base"
	"alsa-lib"
	"freetype2"
	"glu"
	"libxcursor"
	"libxinerama"
	"mesa"
)

source=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/godot-${_pkgver}-rc${_pkgverb}.tar.xz")
sha512sums=("SKIP")
package_godot4-rc-src(){
	pkgdesc+=" Release Candidate SourceCode"
	groups+=(
		"godot-src"
	)
	install -d "${pkgdir}/opt/godot/src/godot4-rc/"
	cp -r "${srcdir}/godot-${_pkgver}-rc${_pkgverb}/"* "${pkgdir}/opt/godot/src/godot4-rc/"
}

##################
# Godot GDScript #
##################

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_linux.x86_64.zip")
sha512sums+=("SKIP")
package_godot4-rc-bin(){
	pkgdesc+=" Release Candidate Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-standard"
		"godot-standard64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_linux.x86_64" "${pkgdir}/opt/godot/godot4-rc-bin"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot4-rc-bin" "${pkgdir}/usr/bin/godot4-rc-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot4-rc-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot4 Engine Release Candidate Binary v${_pkgver}-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Release Candidate Binary Version"
		Comment=Application for making games
		Exec=/usr/bin/godot4-rc-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_linux.x86_32.zip")
sha512sums+=("SKIP")
package_godot4-rc-bin32(){
	pkgdesc+=" Release Candidate Binary Version 32b"
	groups+=(
		"godot-gdscript"
		"godot-standard"
		"godot-standard32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_linux.x86_32" "${pkgdir}/opt/godot/godot4-rc-bin32"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot4-rc-bin32" "${pkgdir}/usr/bin/godot4-rc-bin32"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot4-rc-bin32.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot4 Engine Release Candidate Binary v${_pkgver}-rc${_pkgverb} 32b
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Release Candidate Binary Version 32b"
		Comment=Application for making games
		Exec=/usr/bin/godot4-rc-bin32 %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_export_templates.tpz")
noextract=("Godot_v${_pkgver}-rc${_pkgverb}_export_templates.tpz")
sha512sums+=("SKIP")
package_godot4-rc-export-templates-bin(){
	pkgdesc+=" Release Candidate Export Templates Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-export-templates"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_export_templates.tpz" "${pkgdir}/opt/godot/godot4-rc-export-templates-bin.tpz"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/godot-lib.${_pkgver}.rc${_pkgverb}.template_release.aar")
noextract+=("godot-lib.${_pkgver}.rc${_pkgverb}.template_release.aar")
sha512sums+=("SKIP")
package_libgodot4-rc-bin(){
	pkgdesc+=" Release Candidate LibGodot Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-lib"
	)
	install -Dm755 "${srcdir}/godot-lib.${_pkgver}.rc${_pkgverb}.template_release.aar" "${pkgdir}/opt/godot/godot-lib/libgodot4-rc-bin.aar"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_web_editor.zip")
noextract+=("Godot_v${_pkgver}-rc${_pkgverb}_web_editor.zip")
sha512sums+=("SKIP")
package_godot4-rc-web-bin(){
	pkgdesc+=" Release Candidate Web Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-web"
	)
	unzip "Godot_v${_pkgver}-rc${_pkgverb}_web_editor.zip" -d "${srcdir}/godot4-rc-web-bin.d"
	install -d "${pkgdir}/opt/godot/"
	cp -r "${srcdir}/godot4-rc-web-bin.d" "${pkgdir}/opt/godot/"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_macos.universal.zip")
sha512sums+=("SKIP")
package_godot4-rc-osx-bin(){
	pkgdesc+=" Release Candidate MacOSX Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-osx"
		"godot-osx-universal"
	)
	install -Dm755 "${srcdir}/Godot.app/Contents/MacOS/Godot" "${pkgdir}/opt/godot/godot4-rc-osx-bin"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_win32.exe.zip")
sha512sums+=("SKIP")
package_godot4-rc-win32-bin(){
	groups+=(
		"godot-gdscript"
		"godot-win"
		"godot-win32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32.exe" "${pkgdir}/opt/godot/godot4-rc-win32-bin.exe"
	#install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32_console.cmd" "${pkgdir}/opt/godot/godot4-rc-win32-bin.cmd"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32_console.exe" "${pkgdir}/opt/godot/godot4-rc-win32cmd-bin.exe"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_win64.exe.zip")
sha512sums+=("SKIP")
package_godot4-rc-win64-bin(){
	pkgdesc+=" Release Candidate Windows Binary Version 32b"
	groups+=(
		"godot-gdscript"
		"godot-win"
		"godot-win64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64.exe" "${pkgdir}/opt/godot/godot4-rc-win64-bin.exe"
	#install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64_console.cmd" "${pkgdir}/opt/godot/godot4-rc-win64-bin.cmd"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64_console.exe" "${pkgdir}/opt/godot/godot4-rc-win64cmd-bin.exe"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_android_editor.apk")
noextract+=("Godot_v${_pkgver}-rc${_pkgverb}_android_editor.apk")
sha512sums+=("SKIP")
package_godot4-rc-android-apk-bin(){
	pkgdesc+=" Release Candidate Android APK Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-android-apk"
		"godot-android"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_android_editor.apk" "${pkgdir}/opt/godot/godot4-rc-android-bin.apk"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/Godot_v${_pkgver}-rc${_pkgverb}_android_editor.aab")
noextract+=("Godot_v${_pkgver}-rc${_pkgverb}_android_editor.aab")
sha512sums+=("SKIP")
package_godot4-rc-android-aab-bin(){
	pkgdesc+=" Release Candidate Android AAB Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-android-aab"
		"godot-android"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_android_editor.aab" "${pkgdir}/opt/godot/godot4-rc-android-bin.aab"
}

##############
# Godot Mono #
##############
source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/mono/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_64.zip")
sha512sums+=("SKIP")
package_godot4-rc-mono-bin(){
	pkgdesc+=" Release Candidate Mono Binary Version"
	depends+=("${_monodepends}")
	groups+=(
		"godot-mono"
		"godot-standard"
		"godot-standard64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_64/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux.x86_64" "${pkgdir}/opt/godot/godot4-rc-mono-bin.d/godot4-rc-mono-bin"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_64/GodotSharp" "${pkgdir}/opt/godot/godot4-rc-mono-bin.d/GodotSharp"
	ln -s "/opt/godot/godot4-rc-mono-bin.d/godot4-rc-mono-bin" "${pkgdir}/opt/godot/godot4-rc-mono-bin"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot4-rc-mono-bin.d/godot4-rc-mono-bin" "${pkgdir}/usr/bin/godot4-rc-mono-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot4-rc-mono-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot4 Engine Release Candidate Mono Binary v${_pkgver}-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Release Candidate Mono Binary Version"
		Comment=Application for making games
		Exec=/usr/bin/godot4-rc-mono-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/mono/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_32.zip")
sha512sums+=("SKIP")
package_godot4-rc-mono-bin32(){
	pkgdesc+=" Release Candidate Mono Binary Version 32b"
	depends+=("${_monodepends}")
	groups+=(
		"godot-mono"
		"godot-standard"
		"godot-standard32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_32/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux.x86_32" "${pkgdir}/opt/godot/godot4-rc-mono-bin32.d/godot4-rc-mono-bin32"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_32/GodotSharp" "${pkgdir}/opt/godot/godot4-rc-mono-bin32.d/GodotSharp"
	ln -s "/opt/godot/godot4-rc-mono-bin32.d/godot4-rc-mono-bin32" "${pkgdir}/opt/godot/godot4-rc-mono-bin32"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot4-rc-mono-bin32.d/godot4-rc-mono-bin32" "${pkgdir}/usr/bin/godot4-rc-mono-bin32"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot4-rc-mono-bin32.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot4 Engine Release Candidate Mono Binary v${_pkgver}-rc${_pkgverb} 32b
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Release Candidate Mono Binary Version 32b"
		Comment=Application for making games.
		Exec=/usr/bin/godot4-rc-mono-bin32 %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/mono/Godot_v${_pkgver}-rc${_pkgverb}_mono_export_templates.tpz")
noextract+=("Godot_v${_pkgver}-rc${_pkgverb}_mono_export_templates.tpz")
sha512sums+=("SKIP")
package_godot4-rc-mono-export-templates-bin(){
	pkgdesc+=" Release Candidate Export Templates Mono Binary Version"
	groups+=(
		"godot-mono"
		"godot-export-templates"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_export_templates.tpz" "${pkgdir}/opt/godot/godot4-rc-mono-export-templates-bin.tpz"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/mono/Godot_v${_pkgver}-rc${_pkgverb}_mono_macos.universal.zip")
sha512sums+=("SKIP")
package_godot4-rc-mono-osx-bin(){
	pkgdesc+=" Release Candidate MacOSX Mono Binary Version"
	groups+=(
		"godot-mono"
		"godot-osx"
		"godot-osx-universal"
	)
	install -Dm755 "${srcdir}/Godot_mono.app/Contents/MacOS/Godot" "${pkgdir}/opt/godot/godot4-rc-mono-osx-bin.d/godot4-rc-mono-osx-bin"
	cp -r "${srcdir}/Godot_mono.app/Contents/Resources/GodotSharp" "${pkgdir}/opt/godot/godot4-rc-mono-osx-bin.d/GodotSharp"
	ln -s "/opt/godot/godot4-rc-mono-osx-bin.d/godot4-rc-mono-osx-bin" "${pkgdir}/opt/godot/godot4-rc-mono-osx-bin"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/mono/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32.zip")
sha512sums+=("SKIP")
package_godot4-rc-mono-win32-bin(){
	pkgdesc+=" Release Candidate Windows Mono Binary Version 32b"
	groups+=(
		"godot-mono"
		"godot-win"
		"godot-win32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32.exe" "${pkgdir}/opt/godot/godot4-rc-mono-win32-bin.d/godot4-rc-mono-win32-bin.exe"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32_console.exe" "${pkgdir}/opt/godot/godot4-rc-mono-win32-bin.d/godot4-rc-mono-win32cmd-bin.exe"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/GodotSharp" "${pkgdir}/opt/godot/godot4-rc-mono-win32-bin.d/GodotSharp"
	ln -s "/opt/godot/godot4-rc-mono-win32-bin.d/godot4-rc-mono-win32-bin.exe" "${pkgdir}/opt/godot/godot4-rc-mono-win32-bin.exe"
	ln -s "/opt/godot/godot4-rc-mono-win32-bin.d/godot4-rc-mono-win32cmd-bin.exe" "${pkgdir}/opt/godot/godot4-rc-mono-win32cmd-bin.exe"
}

source+=("https://downloads.tuxfamily.org/godotengine/${_pkgver}/rc${_pkgverb}/mono/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64.zip")
sha512sums+=("SKIP")
package_godot4-rc-mono-win64-bin(){
	pkgdesc+=" Release Candidate Windows Mono Binary Version 64b"
	groups+=(
		"godot-mono"
		"godot-win"
		"godot-win64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64.exe" "${pkgdir}/opt/godot/godot4-rc-mono-win64-bin.d/godot4-rc-mono-win64-bin.exe"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64_console.exe" "${pkgdir}/opt/godot/godot4-rc-mono-win64-bin.d/godot4-rc-mono-win64cmd-bin.exe"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/GodotSharp" "${pkgdir}/opt/godot/godot4-rc-mono-win64-bin.d/GodotSharp"
	ln -s "/opt/godot/godot4-rc-mono-win64-bin.d/godot4-rc-mono-win64-bin.exe" "${pkgdir}/opt/godot/godot4-rc-mono-win64-bin.exe"
	ln -s "/opt/godot/godot4-rc-mono-win64-bin.d/godot4-rc-mono-win64cmd-bin.exe" "${pkgdir}/opt/godot/godot4-rc-mono-win64cmd-bin.exe"
}

#########
# Godot #
#########

pkgname+=(
	"godot-rc-src"
	##################
	# Godot GDScript #
	##################
	"godot-rc-bin"
	"godot-rc-bin32"
	"godot-rc-export-templates-bin"
	"libgodot-rc-bin"
	"godot-rc-web-bin"
	"godot-rc-osx-bin"
	"godot-rc-win32-bin"
	"godot-rc-win64-bin"
	"godot-rc-android-apk-bin"
	"godot-rc-android-aab-bin"
	##############
	# Godot Mono #
	##############
	"godot-rc-mono-bin"
	"godot-rc-mono-bin32"
	"godot-rc-mono-export-templates-bin"
	"godot-rc-mono-osx-bin"
	"godot-rc-mono-win32-bin"
	"godot-rc-mono-win64-bin"
	)

pkgdescalt="Godot Game Engine: An advanced, feature packed, multi-platform 2D and 3D game engine."

package_godot-rc-src(){
	pkgdesc+="${pkgdescalt} Release Candidate SourceCode"
	groups+=(
		"godot-src"
	)
	install -d "${pkgdir}/opt/godot/src/godot-rc/"
	cp -r "${srcdir}/godot-${_pkgver}-rc${_pkgverb}/"* "${pkgdir}/opt/godot/src/godot-rc/"
}

##################
# Godot GDScript #
##################

package_godot-rc-bin(){
	pkgdesc+="${pkgdescalt} Release Candidate Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-standard"
		"godot-standard64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_linux.x86_64" "${pkgdir}/opt/godot/godot-rc-bin"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot-rc-bin" "${pkgdir}/usr/bin/godot-rc-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot-rc-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot Engine Release Candidate Binary v${_pkgver}-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Release Candidate Binary Version"
		Comment=Application for making games
		Exec=/usr/bin/godot-rc-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

package_godot-rc-bin32(){
	pkgdesc+="${pkgdescalt} Release Candidate Binary Version 32b"
	groups+=(
		"godot-gdscript"
		"godot-standard"
		"godot-standard32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_linux.x86_32" "${pkgdir}/opt/godot/godot-rc-bin32"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot-rc-bin32" "${pkgdir}/usr/bin/godot-rc-bin32"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot-rc-bin32.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot Engine Release Candidate Binary v${_pkgver}-rc${_pkgverb} 32b
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Release Candidate Binary Version 32b"
		Comment=Application for making games
		Exec=/usr/bin/godot-rc-bin32 %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

package_godot-rc-export-templates-bin(){
	pkgdesc+="${pkgdescalt} Release Candidate Export Templates Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-export-templates"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_export_templates.tpz" "${pkgdir}/opt/godot/godot-rc-export-templates-bin.tpz"
}

package_libgodot-rc-bin(){
	pkgdesc+="${pkgdescalt} Release Candidate LibGodot Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-lib"
	)
	install -Dm755 "${srcdir}/godot-lib.${_pkgver}.rc${_pkgverb}.template_release.aar" "${pkgdir}/opt/godot/godot-lib/libgodot-rc-bin.aar"
}

package_godot-rc-web-bin(){
	pkgdesc+="${pkgdescalt} Release Candidate Web Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-web"
	)
	unzip "Godot_v${_pkgver}-rc${_pkgverb}_web_editor.zip" -d "${srcdir}/godot-rc-web-bin.d"
	install -d "${pkgdir}/opt/godot/"
	cp -r "${srcdir}/godot-rc-web-bin.d" "${pkgdir}/opt/godot/"
}

package_godot-rc-osx-bin(){
	pkgdesc+="${pkgdescalt} Release Candidate MacOSX Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-osx"
		"godot-osx-universal"
	)
	install -Dm755 "${srcdir}/Godot.app/Contents/MacOS/Godot" "${pkgdir}/opt/godot/godot-rc-osx-bin"
}

package_godot-rc-win32-bin(){
	pkgdesc+="${pkgdescalt} Release Candidate Windows Binary Version 32b"
	groups+=(
		"godot-gdscript"
		"godot-win"
		"godot-win32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32.exe" "${pkgdir}/opt/godot/godot-rc-win32-bin.exe"
	#install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32_console.cmd" "${pkgdir}/opt/godot/godot-rc-win32-bin.cmd"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32_console.exe" "${pkgdir}/opt/godot/godot-rc-win32cmd-bin.exe"
}

package_godot-rc-win64-bin(){
	pkgdesc+="${pkgdescalt} Release Candidate Windows Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-win"
		"godot-win64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64.exe" "${pkgdir}/opt/godot/godot-rc-win64-bin.exe"
	#install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64_console.cmd" "${pkgdir}/opt/godot/godot-rc-win64-bin.cmd"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64_console.exe" "${pkgdir}/opt/godot/godot-rc-win64cmd-bin.exe"
}

package_godot-rc-android-apk-bin(){
	pkgdesc+="${pkgdescalt} Release Candidate Android APK Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-android-apk"
		"godot-android"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_android_editor.apk" "${pkgdir}/opt/godot/godot-rc-android-bin.apk"
}

package_godot-rc-android-aab-bin(){
	pkgdesc+="${pkgdescalt} Release Candidate Android AAB Binary Version"
	groups+=(
		"godot-gdscript"
		"godot-android-aab"
		"godot-android"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_android_editor.aab" "${pkgdir}/opt/godot/godot-rc-android-bin.aab"
}

##############
# Godot Mono #
##############
package_godot-rc-mono-bin(){
	pkgdesc+="${pkgdescalt} Release Candidate Mono Binary Version"
	depends+=("${_monodepends}")
	groups+=(
		"godot-mono"
		"godot-standard"
		"godot-standard64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_64/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux.x86_64" "${pkgdir}/opt/godot/godot-rc-mono-bin.d/godot-rc-mono-bin"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_64/GodotSharp" "${pkgdir}/opt/godot/godot-rc-mono-bin.d/GodotSharp"
	ln -s "/opt/godot/godot-rc-mono-bin.d/godot-rc-mono-bin" "${pkgdir}/opt/godot/godot-rc-mono-bin"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot-rc-mono-bin.d/godot-rc-mono-bin" "${pkgdir}/usr/bin/godot-rc-mono-bin"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot-rc-mono-bin.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot Engine Release Candidate Mono Binary v${_pkgver}-rc${_pkgverb}
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Release Candidate Mono Binary Version"
		Comment=Application for making games
		Exec=/usr/bin/godot-rc-mono-bin %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

package_godot-rc-mono-bin32(){
	pkgdesc+="${pkgdescalt} Release Candidate Mono Binary Version 32b"
	depends+=("${_monodepends}")
	groups+=(
		"godot-mono"
		"godot-standard"
		"godot-standard32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_32/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux.x86_32" "${pkgdir}/opt/godot/godot-rc-mono-bin32.d/godot-rc-mono-bin32"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_32/GodotSharp" "${pkgdir}/opt/godot/godot-rc-mono-bin32.d/GodotSharp"
	ln -s "/opt/godot/godot-rc-mono-bin32.d/godot-rc-mono-bin32" "${pkgdir}/opt/godot/godot-rc-mono-bin32"
	
	install -d "${pkgdir}/usr/bin/"
	ln -s "/opt/godot/godot-rc-mono-bin32.d/godot-rc-mono-bin32" "${pkgdir}/usr/bin/godot-rc-mono-bin32"
	
	install -d "${pkgdir}/usr/share/applications/"
	cat > "${pkgdir}/usr/share/applications/godot-rc-mono-bin32.desktop" <<-EOF
		[Desktop Entry]
		Name=Godot Engine Release Candidate Mono Binary v${_pkgver}-rc${_pkgverb} 32b
		GenericName="Advanced cross-platform 2D and 3D libre game engine. Release Candidate Mono Binary Version 32b"
		Comment=Application for making games.
		Exec=/usr/bin/godot-rc-mono-bin32 %U
		Icon=godot
		Terminal=false
		Type=Application
		MimeType=application/x-godot-project;
		Categories=Development;IDE;
	EOF
}

package_godot-rc-mono-export-templates-bin(){
	pkgdesc+="${pkgdescalt} Release Candidate Export Templates Mono Binary Version"
	groups+=(
		"godot-mono"
		"godot-export-templates"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_export_templates.tpz" "${pkgdir}/opt/godot/godot-rc-mono-export-templates-bin.tpz"
}

package_godot-rc-mono-osx-bin(){
	pkgdesc+="${pkgdescalt} Release Candidate MacOSX Mono Binary Version"
	groups+=(
		"godot-mono"
		"godot-osx"
		"godot-osx-universal"
	)
	install -Dm755 "${srcdir}/Godot_mono.app/Contents/MacOS/Godot" "${pkgdir}/opt/godot/godot-rc-mono-osx-bin.d/godot-rc-mono-osx-bin"
	cp -r "${srcdir}/Godot_mono.app/Contents/Resources/GodotSharp" "${pkgdir}/opt/godot/godot-rc-mono-osx-bin.d/GodotSharp"
	ln -s "/opt/godot/godot-rc-mono-osx-bin.d/godot-rc-mono-osx-bin" "${pkgdir}/opt/godot/godot-rc-mono-osx-bin"
}

package_godot-rc-mono-win32-bin(){
	pkgdesc+="${pkgdescalt} Release Candidate Windows Mono Binary Version 32b"
	groups+=(
		"godot-mono"
		"godot-win"
		"godot-win32"
		"godot-32"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32.exe" "${pkgdir}/opt/godot/godot-rc-mono-win32-bin.d/godot-rc-mono-win32-bin.exe"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32_console.exe" "${pkgdir}/opt/godot/godot-rc-mono-win32-bin.d/godot-rc-mono-win32cmd-bin.exe"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/GodotSharp" "${pkgdir}/opt/godot/godot-rc-mono-win32-bin.d/GodotSharp"
	ln -s "/opt/godot/godot-rc-mono-win32-bin.d/godot-rc-mono-win32-bin.exe" "${pkgdir}/opt/godot/godot-rc-mono-win32-bin.exe"
	ln -s "/opt/godot/godot-rc-mono-win32-bin.d/godot-rc-mono-win32cmd-bin.exe" "${pkgdir}/opt/godot/godot-rc-mono-win32cmd-bin.exe"
}

package_godot-rc-mono-win64-bin(){
	pkgdesc+="${pkgdescalt} Release Candidate Windows Mono Binary Version 64b"
	groups+=(
		"godot-mono"
		"godot-win"
		"godot-win64"
		"godot-64"
	)
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64.exe" "${pkgdir}/opt/godot/godot-rc-mono-win64-bin.d/godot-rc-mono-win64-bin.exe"
	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64_console.exe" "${pkgdir}/opt/godot/godot-rc-mono-win64-bin.d/godot-rc-mono-win64cmd-bin.exe"
	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/GodotSharp" "${pkgdir}/opt/godot/godot-rc-mono-win64-bin.d/GodotSharp"
	ln -s "/opt/godot/godot-rc-mono-win64-bin.d/godot-rc-mono-win64-bin.exe" "${pkgdir}/opt/godot/godot-rc-mono-win64-bin.exe"
	ln -s "/opt/godot/godot-rc-mono-win64-bin.d/godot-rc-mono-win64cmd-bin.exe" "${pkgdir}/opt/godot/godot-rc-mono-win64cmd-bin.exe"
}


# ################
# # Godot Latest #
# ################

# pkgname+=(
# 	"godot-latest-src"
#	##################
# 	# Godot GDScript #
#	##################
# 	"godot-latest-bin"
# 	"godot-latest-bin32"
# 	"godot-latest-export-templates-bin"
# 	"libgodot-latest-bin"
# 	"godot-latest-web-bin"
# 	"godot-latest-osx-bin"
# 	"godot-latest-win32-bin"
# 	"godot-latest-win64-bin"
# 	"godot-latest-android-apk-bin"
# 	"godot-latest-android-aab-bin"
#	##############
# 	# Godot Mono #
#	##############
# 	"godot-latest-mono-bin"
# 	"godot-latest-mono-bin32"
# 	"godot-latest-mono-export-templates-bin"
# 	"godot-latest-mono-osx-bin"
# 	"godot-latest-mono-win32-bin"
# 	"godot-latest-mono-win64-bin"
# 	)

# pkgdesclatest="Godot Latest Game Engine: An advanced, feature packed, multi-platform 2D and 3D game engine."

# package_godot-latest-src(){
# 	pkgdesc+="${pkgdesclatest} Latest SourceCode"
# 	groups+=(
# 		"godot-latest"
# 		"godot-src"
# 	)
# 	install -d "${pkgdir}/opt/godot/src/godot-latest/"
# 	cp -r "${srcdir}/godot-${_pkgver}-rc${_pkgverb}/"* "${pkgdir}/opt/godot/src/godot-latest/"
# }

# ##################
# # Godot GDScript #
# ##################

# package_godot-latest-bin(){
# 	pkgdesc+="${pkgdesclatest} Latest Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-standard"
# 		"godot-standard64"
# 		"godot-64"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_linux.x86_64" "${pkgdir}/opt/godot/godot-latest-bin"
	
# 	install -d "${pkgdir}/usr/bin/"
# 	ln -s "/opt/godot/godot-latest-bin" "${pkgdir}/usr/bin/godot-latest-bin"
	
# 	install -d "${pkgdir}/usr/share/applications/"
# 	cat > "${pkgdir}/usr/share/applications/godot-latest-bin.desktop" <<-EOF
# 		[Desktop Entry]
# 		Name=Godot Engine Latest Binary v${_pkgver}-rc${_pkgverb}
# 		GenericName="Advanced cross-platform 2D and 3D libre game engine. Latest Binary Version"
# 		Comment=Application for making games
# 		Exec=/usr/bin/godot-latest-bin %U
# 		Icon=godot
# 		Terminal=false
# 		Type=Application
# 		MimeType=application/x-godot-project;
# 		Categories=Development;IDE;
# 	EOF
# }

# package_godot-latest-bin32(){
# 	pkgdesc+="${pkgdesclatest} Latest Binary Version 32b"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-standard"
# 		"godot-standard32"
# 		"godot-32"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_linux.x86_32" "${pkgdir}/opt/godot/godot-latest-bin32"
	
# 	install -d "${pkgdir}/usr/bin/"
# 	ln -s "/opt/godot/godot-latest-bin32" "${pkgdir}/usr/bin/godot-latest-bin32"
	
# 	install -d "${pkgdir}/usr/share/applications/"
# 	cat > "${pkgdir}/usr/share/applications/godot-latest-bin32.desktop" <<-EOF
# 		[Desktop Entry]
# 		Name=Godot Engine Latest Binary v${_pkgver}-rc${_pkgverb} 32b
# 		GenericName="Advanced cross-platform 2D and 3D libre game engine. Latest Binary Version 32b"
# 		Comment=Application for making games
# 		Exec=/usr/bin/godot-latest-bin32 %U
# 		Icon=godot
# 		Terminal=false
# 		Type=Application
# 		MimeType=application/x-godot-project;
# 		Categories=Development;IDE;
# 	EOF
# }

# package_godot-latest-export-templates-bin(){
# 	pkgdesc+="${pkgdesclatest} Latest Export Templates Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-export-templates"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_export_templates.tpz" "${pkgdir}/opt/godot/godot-latest-export-templates-bin.tpz"
# }

# package_libgodot-latest-bin(){
# 	pkgdesc+="${pkgdesclatest} Latest LibGodot Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-lib"
# 	)
# 	install -Dm755 "${srcdir}/godot-lib.${_pkgver}.rc${_pkgverb}.template_release.aar" "${pkgdir}/opt/godot/godot-lib/libgodot-latest-bin.aar"
# }

# package_godot-latest-web-bin(){
# 	pkgdesc+="${pkgdesclatest} Latest Web Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-web"
# 	)
# 	unzip "Godot_v${_pkgver}-rc${_pkgverb}_web_editor.zip" -d "${srcdir}/godot-latest-web-bin.d"
# 	install -d "${pkgdir}/opt/godot/"
# 	cp -r "${srcdir}/godot-latest-web-bin.d" "${pkgdir}/opt/godot/"
# }

# package_godot-latest-osx-bin(){
# 	pkgdesc+="${pkgdesclatest} Latest MacOSX Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-osx"
# 		"godot-osx-universal"
# 	)
# 	install -Dm755 "${srcdir}/Godot.app/Contents/MacOS/Godot" "${pkgdir}/opt/godot/godot-latest-osx-bin"
# }

# package_godot-latest-win32-bin(){
# 	pkgdesc+="${pkgdesclatest} Latest Windows Binary Version 32b"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-win"
# 		"godot-win32"
# 		"godot-32"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32.exe" "${pkgdir}/opt/godot/godot-latest-win32-bin.exe"
# 	#install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32_console.cmd" "${pkgdir}/opt/godot/godot-latest-win32-bin.cmd"
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32_console.exe" "${pkgdir}/opt/godot/godot-latest-win32cmd-bin.exe"
# }

# package_godot-latest-win64-bin(){
# 	pkgdesc+="${pkgdesclatest} Latest Windows Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-win"
# 		"godot-win64"
# 		"godot-64"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64.exe" "${pkgdir}/opt/godot/godot-latest-win64-bin.exe"
# 	#install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64_console.cmd" "${pkgdir}/opt/godot/godot-latest-win64-bin.cmd"
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64_console.exe" "${pkgdir}/opt/godot/godot-latest-win64cmd-bin.exe"
# }

# package_godot-latest-android-apk-bin(){
# 	pkgdesc+="${pkgdesclatest} Latest Android APK Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-android-apk"
# 		"godot-android"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_android_editor.apk" "${pkgdir}/opt/godot/godot-latest-android-bin.apk"
# }

# package_godot-latest-android-aab-bin(){
# 	pkgdesc+="${pkgdesclatest} Latest Android AAB Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-android-aab"
# 		"godot-android"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_android_editor.aab" "${pkgdir}/opt/godot/godot-latest-android-bin.aab"
# }

# ##############
# # Godot Mono #
# ##############
# package_godot-latest-mono-bin(){
# 	pkgdesc+="${pkgdesclatest} Latest Mono Binary Version"
# 	depends+=("${_monodepends}")
# 	groups+=(
# 		"godot-latest"
# 		"godot-mono"
# 		"godot-standard"
# 		"godot-standard64"
# 		"godot-64"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_64/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux.x86_64" "${pkgdir}/opt/godot/godot-latest-mono-bin.d/godot-latest-mono-bin"
# 	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_64/GodotSharp" "${pkgdir}/opt/godot/godot-latest-mono-bin.d/GodotSharp"
# 	ln -s "/opt/godot/godot-latest-mono-bin.d/godot-latest-mono-bin" "${pkgdir}/opt/godot/godot-latest-mono-bin"
	
# 	install -d "${pkgdir}/usr/bin/"
# 	ln -s "/opt/godot/godot-latest-mono-bin.d/godot-latest-mono-bin" "${pkgdir}/usr/bin/godot-latest-mono-bin"
	
# 	install -d "${pkgdir}/usr/share/applications/"
# 	cat > "${pkgdir}/usr/share/applications/godot-latest-mono-bin.desktop" <<-EOF
# 		[Desktop Entry]
# 		Name=Godot Engine Latest Mono Binary v${_pkgver}-rc${_pkgverb}
# 		GenericName="Advanced cross-platform 2D and 3D libre game engine. Latest Mono Binary Version"
# 		Comment=Application for making games
# 		Exec=/usr/bin/godot-latest-mono-bin %U
# 		Icon=godot
# 		Terminal=false
# 		Type=Application
# 		MimeType=application/x-godot-project;
# 		Categories=Development;IDE;
# 	EOF
# }

# package_godot-latest-mono-bin32(){
# 	pkgdesc+="${pkgdesclatest} Latest Mono Binary Version 32b"
# 	depends+=("${_monodepends}")
# 	groups+=(
# 		"godot-latest"
# 		"godot-mono"
# 		"godot-standard"
# 		"godot-standard32"
# 		"godot-32"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_32/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux.x86_32" "${pkgdir}/opt/godot/godot-latest-mono-bin32.d/godot-latest-mono-bin32"
# 	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_32/GodotSharp" "${pkgdir}/opt/godot/godot-latest-mono-bin32.d/GodotSharp"
# 	ln -s "/opt/godot/godot-latest-mono-bin32.d/godot-latest-mono-bin32" "${pkgdir}/opt/godot/godot-latest-mono-bin32"
	
# 	install -d "${pkgdir}/usr/bin/"
# 	ln -s "/opt/godot/godot-latest-mono-bin32.d/godot-latest-mono-bin32" "${pkgdir}/usr/bin/godot-latest-mono-bin32"
	
# 	install -d "${pkgdir}/usr/share/applications/"
# 	cat > "${pkgdir}/usr/share/applications/godot-latest-mono-bin32.desktop" <<-EOF
# 		[Desktop Entry]
# 		Name=Godot Engine Latest Mono Binary v${_pkgver}-rc${_pkgverb} 32b
# 		GenericName="Advanced cross-platform 2D and 3D libre game engine. Latest Mono Binary Version 32b"
# 		Comment=Application for making games.
# 		Exec=/usr/bin/godot-latest-mono-bin32 %U
# 		Icon=godot
# 		Terminal=false
# 		Type=Application
# 		MimeType=application/x-godot-project;
# 		Categories=Development;IDE;
# 	EOF
# }

# package_godot-latest-mono-export-templates-bin(){
# 	pkgdesc+="${pkgdesclatest} Latest Export Templates Mono Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-mono"
# 		"godot-export-templates"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_export_templates.tpz" "${pkgdir}/opt/godot/godot-latest-mono-export-templates-bin.tpz"
# }

# package_godot-latest-mono-osx-bin(){
# 	pkgdesc+="${pkgdesclatest} Latest MacOSX Mono Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-mono"
# 		"godot-osx"
# 		"godot-osx-universal"
# 	)
# 	install -Dm755 "${srcdir}/Godot_mono.app/Contents/MacOS/Godot" "${pkgdir}/opt/godot/godot-latest-mono-osx-bin.d/godot-latest-mono-osx-bin"
# 	cp -r "${srcdir}/Godot_mono.app/Contents/Resources/GodotSharp" "${pkgdir}/opt/godot/godot-latest-mono-osx-bin.d/GodotSharp"
# 	ln -s "/opt/godot/godot-latest-mono-osx-bin.d/godot-latest-mono-osx-bin" "${pkgdir}/opt/godot/godot-latest-mono-osx-bin"
# }

# package_godot-latest-mono-win32-bin(){
# 	pkgdesc+="${pkgdesclatest} Latest Windows Mono Binary Version 32b"
# 	groups+=(
# 		"godot-latest"
# 		"godot-mono"
# 		"godot-win"
# 		"godot-win32"
# 		"godot-32"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32.exe" "${pkgdir}/opt/godot/godot-latest-mono-win32-bin.d/godot-latest-mono-win32-bin.exe"
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32_console.exe" "${pkgdir}/opt/godot/godot-latest-mono-win32-bin.d/godot-latest-mono-win32cmd-bin.exe"
# 	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/GodotSharp" "${pkgdir}/opt/godot/godot-latest-mono-win32-bin.d/GodotSharp"
# 	ln -s "/opt/godot/godot-latest-mono-win32-bin.d/godot-latest-mono-win32-bin.exe" "${pkgdir}/opt/godot/godot-latest-mono-win32-bin.exe"
# 	ln -s "/opt/godot/godot-latest-mono-win32-bin.d/godot-latest-mono-win32cmd-bin.exe" "${pkgdir}/opt/godot/godot-latest-mono-win32cmd-bin.exe"
# }

# package_godot-latest-mono-win64-bin(){
# 	pkgdesc+="${pkgdesclatest} Latest Windows Mono Binary Version 64b"
# 	groups+=(
# 		"godot-latest"
# 		"godot-mono"
# 		"godot-win"
# 		"godot-win64"
# 		"godot-64"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64.exe" "${pkgdir}/opt/godot/godot-latest-win64-bin.d/godot-latest-win64-bin.exe"
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64_console.exe" "${pkgdir}/opt/godot/godot-latest-win64-bin.d/godot-latest-win64cmd-bin.exe"
# 	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/GodotSharp" "${pkgdir}/opt/godot/godot-latest-win64-bin.d/GodotSharp"
# 	ln -s "/opt/godot/godot-latest-win64-bin.d/godot-latest-mono-win64-bin.exe" "${pkgdir}/opt/godot/godot-latest-mono-win64-bin.exe"
# 	ln -s "/opt/godot/godot-latest-win64-bin.d/godot-latest-mono-win64cmd-bin.exe" "${pkgdir}/opt/godot/godot-latest-mono-win64cmd-bin.exe"
# }

# #################
# # Godot4 Latest #
# #################

# pkgname+=(
# 	"godot4-latest-src"
#	##################
# 	# Godot GDScript #
#	##################
# 	"godot4-latest-bin"
# 	"godot4-latest-bin32"
# 	"godot4-latest-export-templates-bin"
# 	"libgodot4-latest-bin"
# 	"godot4-latest-web-bin"
# 	"godot4-latest-osx-bin"
# 	"godot4-latest-win32-bin"
# 	"godot4-latest-win64-bin"
# 	"godot4-latest-android-apk-bin"
# 	"godot4-latest-android-aab-bin"
#	##############
# 	# Godot Mono #
#	##############
# 	"godot4-latest-mono-bin"
# 	"godot4-latest-mono-bin32"
# 	"godot4-latest-mono-export-templates-bin"
# 	"godot4-latest-mono-osx-bin"
# 	"godot4-latest-mono-win32-bin"
# 	"godot4-latest-mono-win64-bin"
# 	)

# pkgdescaltlatest="Godot4 Latest Game Engine: An advanced, feature packed, multi-platform 2D and 3D game engine."

# package_godot4-latest-src(){
# 	pkgdesc+="${pkgdescaltlatest} Latest SourceCode"
# 	groups+=(
# 		"godot-latest"
# 		"godot-src"
# 	)
# 	install -d "${pkgdir}/opt/godot/src/godot4-latest/"
# 	cp -r "${srcdir}/godot-${_pkgver}-rc${_pkgverb}/"* "${pkgdir}/opt/godot/src/godot4-latest/"
# }

# ##################
# # Godot GDScript #
# ##################

# package_godot4-latest-bin(){
# 	pkgdesc+="${pkgdescaltlatest} Latest Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-standard"
# 		"godot-standard64"
# 		"godot-64"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_linux.x86_64" "${pkgdir}/opt/godot/godot4-latest-bin"
	
# 	install -d "${pkgdir}/usr/bin/"
# 	ln -s "/opt/godot/godot4-latest-bin" "${pkgdir}/usr/bin/godot4-latest-bin"
	
# 	install -d "${pkgdir}/usr/share/applications/"
# 	cat > "${pkgdir}/usr/share/applications/godot4-latest-bin.desktop" <<-EOF
# 		[Desktop Entry]
# 		Name=Godot4 Engine Latest Binary v${_pkgver}-rc${_pkgverb}
# 		GenericName="Advanced cross-platform 2D and 3D libre game engine. Latest Binary Version"
# 		Comment=Application for making games
# 		Exec=/usr/bin/godot4-latest-bin %U
# 		Icon=godot
# 		Terminal=false
# 		Type=Application
# 		MimeType=application/x-godot-project;
# 		Categories=Development;IDE;
# 	EOF
# }

# package_godot4-latest-bin32(){
# 	pkgdesc+="${pkgdescaltlatest} Latest Binary Version 32b"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-standard"
# 		"godot-standard32"
# 		"godot-32"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_linux.x86_32" "${pkgdir}/opt/godot/godot4-latest-bin32"
	
# 	install -d "${pkgdir}/usr/bin/"
# 	ln -s "/opt/godot/godot4-latest-bin32" "${pkgdir}/usr/bin/godot4-latest-bin32"
	
# 	install -d "${pkgdir}/usr/share/applications/"
# 	cat > "${pkgdir}/usr/share/applications/godot4-latest-bin32.desktop" <<-EOF
# 		[Desktop Entry]
# 		Name=Godot4 Engine Latest Binary v${_pkgver}-rc${_pkgverb} 32b
# 		GenericName="Advanced cross-platform 2D and 3D libre game engine. Latest Binary Version 32b"
# 		Comment=Application for making games
# 		Exec=/usr/bin/godot4-latest-bin32 %U
# 		Icon=godot
# 		Terminal=false
# 		Type=Application
# 		MimeType=application/x-godot-project;
# 		Categories=Development;IDE;
# 	EOF
# }

# package_godot4-latest-export-templates-bin(){
# 	pkgdesc+="${pkgdescaltlatest} Latest Export Templates Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-export-templates"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_export_templates.tpz" "${pkgdir}/opt/godot/godot4-latest-export-templates-bin.tpz"
# }

# package_libgodot4-latest-bin(){
# 	pkgdesc+="${pkgdescaltlatest} Latest LibGodot4 Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-lib"
# 	)
# 	install -Dm755 "${srcdir}/godot-lib.${_pkgver}.rc${_pkgverb}.template_release.aar" "${pkgdir}/opt/godot/godot-lib/libgodot4-latest-bin.aar"
# }

# package_godot4-latest-web-bin(){
# 	pkgdesc+="${pkgdescaltlatest} Latest Web Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-web"
# 	)
# 	unzip "Godot_v${_pkgver}-rc${_pkgverb}_web_editor.zip" -d "${srcdir}/godot4-latest-web-bin.d"
# 	install -d "${pkgdir}/opt/godot/
# 	cp -r "${srcdir}/godot4-latest-web-bin.d" "${pkgdir}/opt/godot"
# }

# package_godot4-latest-osx-bin(){
# 	pkgdesc+="${pkgdescaltlatest} Latest MacOSX Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-osx"
# 		"godot-osx-universal"
# 	)
# 	install -Dm755 "${srcdir}/Godot.app/Contents/MacOS/Godot" "${pkgdir}/opt/godot/godot4-latest-osx-bin"
# }

# package_godot4-latest-win32-bin(){
# 	pkgdesc+="${pkgdescaltlatest} Latest Windows Binary Version 32b"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-win"
# 		"godot-win32"
# 		"godot-32"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32.exe" "${pkgdir}/opt/godot/godot4-latest-win32-bin.exe"
# 	#install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32_console.cmd" "${pkgdir}/opt/godot/godot4-latest-win32-bin.cmd"
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win32_console.exe" "${pkgdir}/opt/godot/godot4-latest-win32cmd-bin.exe"
# }

# package_godot4-latest-win64-bin(){
# 	pkgdesc+="${pkgdescaltlatest} Latest Windows Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-win"
# 		"godot-win64"
# 		"godot-64"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64.exe" "${pkgdir}/opt/godot/godot4-latest-win64-bin.exe"
# 	#install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64_console.cmd" "${pkgdir}/opt/godot/godot4-latest-win64-bin.cmd"
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_win64_console.exe" "${pkgdir}/opt/godot/godot4-latest-win64cmd-bin.exe"
# }

# package_godot4-latest-android-apk-bin(){
# 	pkgdesc+="${pkgdescaltlatest} Latest Android APK Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-android-apk"
# 		"godot-android"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_android_editor.apk" "${pkgdir}/opt/godot/godot4-latest-android-bin.apk"
# }

# package_godot4-latest-android-aab-bin(){
# 	pkgdesc+="${pkgdescaltlatest} Latest Android AAB Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-gdscript"
# 		"godot-android-aab"
# 		"godot-android"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_android_editor.aab" "${pkgdir}/opt/godot/godot4-latest-android-bin.aab"
# }

# ##############
# # Godot Mono #
# ##############
# package_godot4-latest-mono-bin(){
# 	pkgdesc+="${pkgdescaltlatest} Latest Mono Binary Version"
# 	depends+=("${_monodepends}")
# 	groups+=(
# 		"godot-latest"
# 		"godot-mono"
# 		"godot-standard"
# 		"godot-standard64"
# 		"godot-64"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_64/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux.x86_64" "${pkgdir}/opt/godot/godot4-latest-mono-bin.d/godot4-latest-mono-bin"
# 	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_64/GodotSharp" "${pkgdir}/opt/godot/godot4-latest-mono-bin.d/GodotSharp"
# 	ln -s "/opt/godot/godot4-latest-mono-bin.d/godot4-latest-mono-bin" "${pkgdir}/opt/godot/godot4-latest-mono-bin"

# 	install -d "${pkgdir}/usr/bin/"
# 	ln -s "/opt/godot/godot4-latest-mono-bin.d/godot4-latest-mono-bin" "${pkgdir}/usr/bin/godot4-latest-mono-bin"

# 	install -d "${pkgdir}/usr/share/applications/"
# 	cat > "${pkgdir}/usr/share/applications/godot4-latest-mono-bin.desktop" <<-EOF
# 		[Desktop Entry]
# 		Name=Godot4 Engine Latest Mono Binary v${_pkgver}-rc${_pkgverb}
# 		GenericName="Advanced cross-platform 2D and 3D libre game engine. Latest Mono Binary Version"
# 		Comment=Application for making games
# 		Exec=/usr/bin/godot4-latest-mono-bin %U
# 		Icon=godot
# 		Terminal=false
# 		Type=Application
# 		MimeType=application/x-godot-project;
# 		Categories=Development;IDE;
# 	EOF
# }

# package_godot4-latest-mono-bin32(){
# 	pkgdesc+="${pkgdescaltlatest} Latest Mono Binary Version 32b"
# 	depends+=("${_monodepends}")
# 	groups+=(
# 		"godot-latest"
# 		"godot-mono"
# 		"godot-standard"
# 		"godot-standard32"
# 		"godot-32"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_32/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux.x86_32" "${pkgdir}/opt/godot/godot4-latest-mono-bin32.d/godot4-latest-mono-bin32"
# 	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_linux_x86_32/GodotSharp" "${pkgdir}/opt/godot/godot4-latest-mono-bin32.d/GodotSharp"
# 	ln -s "/opt/godot/godot4-latest-mono-bin32.d/godot4-latest-mono-bin32" "${pkgdir}/opt/godot/godot4-latest-mono-bin32"

# 	install -d "${pkgdir}/usr/bin/"
# 	ln -s "/opt/godot/godot4-latest-mono-bin32.d/godot4-latest-mono-bin32" "${pkgdir}/usr/bin/godot4-latest-mono-bin32"

# 	install -d "${pkgdir}/usr/share/applications/"
# 	cat > "${pkgdir}/usr/share/applications/godot4-latest-mono-bin32.desktop" <<-EOF
# 		[Desktop Entry]
# 		Name=Godot4 Engine Latest Mono Binary v${_pkgver}-rc${_pkgverb} 32b
# 		GenericName="Advanced cross-platform 2D and 3D libre game engine. Latest Mono Binary Version 32b"
# 		Comment=Application for making games.
# 		Exec=/usr/bin/godot4-latest-mono-bin32 %U
# 		Icon=godot
# 		Terminal=false
# 		Type=Application
# 		MimeType=application/x-godot-project;
# 		Categories=Development;IDE;
# 	EOF
# }

# package_godot4-latest-mono-export-templates-bin(){
# 	pkgdesc+="${pkgdescaltlatest} Latest Export Templates Mono Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-mono"
# 		"godot-export-templates"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_export_templates.tpz" "${pkgdir}/opt/godot/godot4-latest-mono-export-templates-bin.tpz"
# }

# package_godot4-latest-mono-osx-bin(){
# 	pkgdesc+="${pkgdescaltlatest} Latest MacOSX Mono Binary Version"
# 	groups+=(
# 		"godot-latest"
# 		"godot-mono"
# 		"godot-osx"
# 		"godot-osx-universal"
# 	)
# 	install -Dm755 "${srcdir}/Godot_mono.app/Contents/MacOS/Godot" "${pkgdir}/opt/godot/godot4-latest-mono-osx-bin.d/godot4-latest-mono-osx-bin"
# 	cp -r "${srcdir}/Godot_mono.app/Contents/Resources/GodotSharp" "${pkgdir}/opt/godot/godot4-latest-mono-osx-bin.d/GodotSharp"
# 	ln -s "/opt/godot/godot4-latest-mono-osx-bin.d/godot4-latest-mono-osx-bin" "${pkgdir}/opt/godot/godot4-latest-mono-osx-bin"
# }

# package_godot4-latest-mono-win32-bin(){
# 	pkgdesc+="${pkgdescaltlatest} Latest Windows Mono Binary Version 32b"
# 	groups+=(
# 		"godot-latest"
# 		"godot-mono"
# 		"godot-win"
# 		"godot-win32"
# 		"godot-32"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32.exe" "${pkgdir}/opt/godot/godot4-latest-mono-win32-bin.d/godot4-latest-mono-win32-bin.exe"
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32_console.exe" "${pkgdir}/opt/godot/godot4-latest-mono-win32-bin.d/godot4-latest-mono-win32cmd-bin.exe"
# 	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win32/GodotSharp" "${pkgdir}/opt/godot/godot4-latest-mono-win32-bin.d/GodotSharp"
# 	ln -s "/opt/godot/godot4-latest-mono-win32-bin.d/godot4-latest-mono-win32-bin.exe" "${pkgdir}/opt/godot/godot4-latest-mono-win32-bin.exe"
# 	ln -s "/opt/godot/godot4-latest-mono-win32-bin.d/godot4-latest-mono-win32cmd-bin.exe" "${pkgdir}/opt/godot/godot4-latest-mono-win32cmd-bin.exe"
# }

# package_godot4-latest-mono-win64-bin(){
# 	pkgdesc+="${pkgdescaltlatest} Latest Windows Mono Binary Version 64b"
# 	groups+=(
# 		"godot-latest"
# 		"godot-mono"
# 		"godot-win"
# 		"godot-win64"
# 		"godot-64"
# 	)
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64.exe" "${pkgdir}/opt/godot/godot4-latest-mono-win64-bin.d/godot4-latest-mono-win64-bin.exe"
# 	install -Dm755 "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64_console.exe" "${pkgdir}/opt/godot/godot4-latest-mono-win64-bin.d/godot4-latest-mono-win64cmd-bin.exe"
# 	cp -r "${srcdir}/Godot_v${_pkgver}-rc${_pkgverb}_mono_win64/GodotSharp" "${pkgdir}/opt/godot/godot4-latest-mono-win64-bin.d/GodotSharp"
# 	ln -s "/opt/godot/godot4-latest-mono-win64-bin.d/godot4-latest-mono-win64-bin.exe" "${pkgdir}/opt/godot/godot4-latest-mono-win64-bin.exe"
# 	ln -s "/opt/godot/godot4-latest-mono-win64-bin.d/godot4-latest-mono-win64cmd-bin.exe" "${pkgdir}/opt/godot/godot4-latest-mono-win64cmd-bin.exe"
# }
